package com.cbh.feign.controller.vehicle;



import java.util.List;

import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import com.cbh.api.model.ApiResult;
import com.cbh.api.model.vehicle.VehicleCompanyRecord;
import com.cbh.api.model.vehicle.Vrhicle;


public interface ApiVehicleControllerBase {

	/**
	 * 根据车牌验证手机号以及验证码查询 车辆信息以及是否可以投保
	 * 
	 * @param accountToken
	 * @param plateType
	 *            号牌种类
	 * @param plateNumber
	 *            车牌号码
	 * @param engineNo
	 * @param phoneNumber
	 *            手机号
	 * @return
	 */
	@RequestMapping(value = "/auth/v3/vehicle/licenseAndPhone", method = RequestMethod.GET, produces = "application/json")
	public ApiResult<Vrhicle> validation(@RequestParam(value = "accountToken", required = true) String accountToken,
			@RequestParam(value = "plateType", defaultValue = "02", required = false) String plateType,
			@RequestParam(value = "plateNumber", required = true) String plateNumber,
			@RequestParam(value = "engineNo", defaultValue = "000000", required = false) String engineNo,
			@RequestParam(value = "phoneNumber", required = true) String phoneNumber);

	/**
	 * 根据车牌获取车辆信息
	 * 
	 * @param plateType
	 * @param plateNumber
	 * @return
	 */
	@RequestMapping(value = "/auth/v3/vehicle/{id}", method = RequestMethod.GET, produces = "application/json")
	public ApiResult<Vrhicle> validation(@RequestParam(value = "accountToken", required = true) String accountToken,
			@PathVariable(value = "id", required = true) String id);

	/**
	 * 根据车牌获取车辆信息
	 * 
	 * @param plateType
	 * @param plateNumber
	 * @return
	 */
	@RequestMapping(value = "/auth/v3/vehicle", method = RequestMethod.GET, produces = "application/json")
	public ApiResult<List<VehicleCompanyRecord>> findVehicle(
			@RequestParam(value = "accountToken", required = true) String accountToken,
			@RequestParam(value = "plateType", defaultValue = "02", required = false) String plateType,
			@RequestParam(value = "plateNumber", required = true) String plateNumber,
			@RequestParam(value = "engineNo", required = false, defaultValue = "000000") String engineNo,
			@RequestParam(value = "idCard", required = false) String idCard,
			@RequestParam(value = "phoneNumber", required = true) String phoneNumber,
			@RequestParam(value = "insuranceCompanyId", required = true, defaultValue = "546545641563456666") String insuranceCompanyId);

	/**
	 * 根据车牌获取车辆信息
	 * 
	 * @param plateType
	 * @param plateNumber
	 * @return
	 */
	@RequestMapping(value = "/auth/v3/vehicle/platenumber", method = RequestMethod.GET, produces = "application/json")
	public ApiResult<Boolean> findVehicle(@RequestParam(value = "accountToken", required = true) String accountToken,
			@RequestParam(value = "plateType", defaultValue = "02", required = false) String plateType,
			@RequestParam(value = "plateNumber", required = true) String plateNumber,
			@RequestParam(value = "engineNo", defaultValue = "000000", required = false) String engineNo,
			@RequestParam(value = "phoneNumber", required = true) String phoneNumber,
			@RequestParam(value = "idCard", required = false) String idCard);

	/**
	 * 根据车牌获取车辆信息
	 * 
	 * @param plateType
	 * @param plateNumber
	 * @return
	 */
	@RequestMapping(value = "/auth/v3/vehicle/label", method = RequestMethod.GET, produces = "application/json")
	public ApiResult<List<VehicleCompanyRecord>> findCompanyVehicle(
			@RequestParam(value = "accountToken", required = true) String accountToken,
			@RequestParam(value = "labelNo", required = true) String labelNo,
			@RequestParam(value = "engineNo", required = false, defaultValue = "000000") String engineNo,
			@RequestParam(value = "frameNo", required = true) String frameNo,
			@RequestParam(value = "insuranceCompanyId", required = false) String insuranceCompanyId);

	@RequestMapping(value = "/auth/v3/vehicle/other", method = RequestMethod.POST, produces = "application/json")
	public ApiResult<String> saveOther(@RequestParam(value = "accountToken", required = true) String accountToken,
			@RequestParam(value = "vrhicleId", required = true) String vrhicleId,
			@RequestParam(value = "transferDate", required = true) String transferDate);

	@RequestMapping(value = "/auth/v3/vehicle/up", method = RequestMethod.POST, produces = "application/json")
	public ApiResult<String> up(@RequestParam(value = "accountToken", required = true) String accountToken,
			@RequestParam(value = "vrhicleId", required = true) String vrhicleId,
			@RequestParam(value = "vehicleModels", required = true) String vehicleModels);

	/**
	 * 更新车辆投保信息<br>
	 * 当前保险投保公司 <br>
	 * 交强险投保生效时间 交强险投保截止时间<br>
	 * 商业险投保生效时间 商业险投保截止时间<br>
	 * <br>
	 * 
	 * @param vrhicleId
	 * @return
	 */
	@RequestMapping(value = "/auth/v3/vehicle/insured", method = RequestMethod.POST, produces = "application/json")
	public ApiResult<String> saveVrhicleInsured(@RequestParam(required = true,value = "vrhicleId") String vrhicleId,
			@RequestParam(required = true, value = "insuranceCompany") String insuranceCompany,
			@RequestParam(required = false, value = "trafficEffectDate") String trafficEffectDate,
			@RequestParam(required = false, value = "trafficInvableDate") String trafficInvableDate,
			@RequestParam(required = false, value = "commercialEffectDate") String commercialEffectDate,
			@RequestParam(required = false, value = "commercialInvableDate") String commercialInvableDate);
}
